package cg.studio.algorithm.graph;

public class Point
{
  String name;
  
  public Point( String name )
  {
    this.name = name;
  }
  
  @Override 
  public boolean equals( Object obj )
  {
    if( obj == null || !( obj instanceof Point ) )
      return false;
    Point another = (Point)obj;
    return name.equals( another.name );
  }
  
  @Override
  public int hashCode()
  {
    if( name == null || name.isEmpty() )
      return 0;
    return name.hashCode();
  }
  
  @Override
  public String toString()
  {
    return name;
  }
}
